import request from '@/utils/request'

const project = {
  list (params) {
    return request.get('/kjxm/project/list', { params })
  },
  add (data) {
    return request.post('/kjxm/project/add', data);
  },
  edit (data) {
    return request.post('/kjxm/project/update', data);
  },
  del (id) {
    return request.post(`/kjxm/project/delete/${id}`);
  },
  get (id) {
    return request.get(`/kjxm/project/detail/${id}`);
  },
  getAll (id) {
    return request.get(`/kjxm/project/allDetail/${id}`);
  },
  getAllHide (id) {
    return request.get(`/kjxm/project/partDetail/${id}`);
  },
  myList (params) {
    return request.get(`/kjxm/project/myList`, { params });
  },
  applyList (params) {
    return request.get(`/kjxm/project/projectList`, { params });
  },
  applyMyList (params) {
    return request.get(`/kjxm/project/myProjectList`, { params });
  },
  // 提交附件
  submitFinish (data) {
    return request.post('/kjxm/project/submitFinish', data);
  },
  // 检验申报资格
  qualification (data) {
    return request.post('/kjxm/project/qualification', data);
  },
  backgroundAdd (data) {
    return request.post('/kjxm/projectBackground/add', data);
  },
  backgroundEdit (data) {
    return request.post('/kjxm/projectBackground/update', data);
  },
  backgroundGet (id) {
    return request.get(`/kjxm/projectBackground/detail/${id}`);
  },
  // 项目id获取项目立项背景和依据
  backgroundGetByProject (id) {
    return request.get(`/kjxm/projectBackground/getByProjectId/${id}`);
  },
  projectList (data) {
    return request.get('/kjxm/project/list', data);
  },
  approachAdd (data) {
    return request.post('/kjxm/projectApproach/add', data);
  },
  approachEdit (data) {
    return request.post('/kjxm/projectApproach/update', data);
  },
  approachGet (id) {
    return request.get(`/kjxm/projectApproach/detail/${id}`);
  },
  basicstudyGet (id) {
    return request.get(`/kjxm/projectBasicstudy/detail/${id}`);
  },
  basicstudyAdd (data) {
    return request.post('/kjxm/projectBasicstudy/add', data);
  },
  basicstudyEdit (data) {
    return request.post('/kjxm/projectBasicstudy/update', data);
  },
  researchPlanGet (id, phaseType) {
    return request.get(`/kjxm/projectResearchPlan/getByProjectIdAndPhaseType/${id}/${phaseType}`);
  },
  researchPlanAdd (data) {
    return request.post('/kjxm/projectResearchPlan/addList', data);
  },
  researchPlanAddNotCheck (data) {
    return request.post('/kjxm/projectResearchPlan/addListNotCheck', data);
  },
  companyGet (id, phaseType) {
    return request.get(`/kjxm/projectCompany/getByProjectId/${id}/${phaseType}`);
  },
  companyAdd (data) {
    return request.post('/kjxm/projectCompany/addList', data);
  },
  companyEdit (data) {
    return request.post('/kjxm/projectCompany/updateList', data);
  },
  memberAdd (data) {
    return request.post('/kjxm/projectMember/addList', data);
  },
  memberAddNotCheck (data) {
    return request.post('/kjxm/projectMember/addListNotCheck', data);
  },
  memberGet (id, phaseType) {
    return request.get(`/kjxm/projectMember/getByProjectId/${id}/${phaseType}`);
  },
  budgetAdd (data) {
    return request.post('/kjxm/projectBudget/add', data);
  },
  budgetAddNotCheck (data) {
    return request.post('/kjxm/projectBudget/addNotCheck', data);
  },
  budgetEdit (data) {
    return request.post('/kjxm/projectBudget/update', data);
  },
  budgetEditNotCheck (data) {
    return request.post('/kjxm/projectBudget/updateNotCheck', data);
  },
  budgetGet (id, phaseType) {
    return request.get(`/kjxm/projectBudget/getByProjectId/${id}/${phaseType}`);
  },
  // 指南列表
  guideList (params) {
    return request.get('/kjxm/projectGuide/list', { params });
  },
  // 指南添加
  guideAdd (data) {
    return request.post('/kjxm/projectGuide/add', data);
  },
  // 指南修改
  guideEdit (data) {
    return request.post('/kjxm/projectGuide/update', data);
  },
  // 指南删除
  guideDel (id) {
    return request.post(`/kjxm/projectGuide/delete/${id}`);
  },
  // 指南详情
  guideGet (id) {
    return request.get(`/kjxm/projectGuide/detail/${id}`);
  },
  // 计划类别list
  planCategoryList () {
    return request.get(`/kjxm/planCategory/list`);
  },
  // 计划类别list  没有子节点
  planCategoryNoChildList () {
    return request.get(`/kjxm/planCategory/noChildList`);
  },
  // 计划类别树
  planCategoryTree () {
    return request.get(`/kjxm/planCategory/tree`);
  },
  // 计划类别可申报树
  planCategoryDeclareTree (params) {
    return request.get(`/kjxm/planCategory/declareTree`, { params });
  },
  // 计划类别详情
  planCategoryGet (id) {
    return request.get(`/kjxm/planCategory/detail/${id}`);
  },
  // 计划类别新增
  planCategoryAdd (data) {
    return request.post('/kjxm/planCategory/add', data);
  },
  // 计划类别修改
  planCategoryEdit (data) {
    return request.post('/kjxm/planCategory/update', data);
  },
  // 计划类别删除
  planCategoryDel (id) {
    return request.post(`/kjxm/planCategory/delete/${id}`);
  },
  //
  findProjectMember (id) {
    return request.get(`/kjxm/projectMember/getMemberInfoByIdCard/${id}`);
  },
  findProjectUser (id) {
    return request.get(`/user/getUsrerInfoByIdCard/${id}`);
  },
  projectSubmit (data) {
    return request.post(`/kjxm/project/submit`, data);
  },
  projectOldSubmit (data) {
    return request.post(`/kjxm/project/submitHistory`, data);
  },
  projectPDF (id) {
    return request.post(`/kjxm/project/createPdf/${id}`, {}, {});
  },
  projectTestPDF (id) {
    return request.post(`/kjxm/project/createPdfByWindows/${id}`, {}, {});
  },
  projectExpectResultsGetByProjectIdAndPhaseType (projectId, phaseType) {
    return request.get(`/kjxm/projectExpectResults/getByProjectIdAndPhaseType/${projectId}/${phaseType}`);
  },
  projectExpectResultsAddOrUpdate (data) {
    return request.post("/kjxm/projectExpectResults/addList", data)
  },
  deptTimeConfigList (params) {
    return request.get(`/kjxm/deptTimeConfig/list`, { params });
  },
  deptTimeConfigUpdate (data) {
    return request.post(`/kjxm/deptTimeConfig/update`, data);
  },
  deptTimeConfigAdd (data) {
    return request.post(`/kjxm/deptTimeConfig/add`, data);
  },
  deptTimeConfigGet (id) {
    return request.get(`/kjxm/deptTimeConfig/detail/${id}`);
  },
  deptTimeConfigDel (id) {
    return request.post(`/kjxm/deptTimeConfig/delete/${id}`);
  },
  planCategoryEnableList () {
    return request.get(`/kjxm/planCategory/enableList`);
  },
  jttList (params) {
    return request.get('/kjxm/project/listForJtt', { params })
  },
  jttMyList (params) {
    return request.get('/kjxm/project/myListForJtt', { params })
  },
  myAchievementList (params) {
    return request.get('/kjxm/project/myAchievementList', { params })
  },
  achievementList (params) {
    return request.get('/kjxm/project/achievementList', { params })
  },
  zjmsList (params) {
    return request.get('/kjxm/project/zjmsList', { params })
  },
  // 获取名称相似的项目列表
  getSimilarProjectByName (data) {
    return request.post(`kjxm/project/getSimilarProjectByName`, data)
  },
  literatureGet (id, phaseType) {
    return request.get(`/kjxm/literature/getByIdAndPhaseType/${id}/${phaseType}`);
  },
  // 项目终止
  terminate (data) {
    return request.post(`/kjxm/project/terminate`, data);
  },
  // 查询公路数据项目
  roadDataList (params) {
    return request.get('/kjxm/project/roadDataList', { params })
  },
  //
  myJoinList (params) {
    return request.get('/kjxm/project/myJoinList', { params })
  },

  getNewAll (id) {
    return request.get(`/kjxm/project/newAllDetail/${id}`);
  },

  // 项目概况
  projectOverviewAdd (data) {
    return request.post('/kjxm/projectOverview/add', data);
  },
  projectOverviewUpdate (data) {
    return request.post('/kjxm/projectOverview/update', data);
  },
  projectOverviewGet (id) {
    return request.get(`/kjxm/projectOverview/detail/${id}`);
  },
  projectFeasibilityReportAdd (data) {
    return request.post(`/kjxm/projectFeasibilityReport/add`, data);
  },
  projectFeasibilityReportUpdate (data) {
    return request.post(`/kjxm/projectFeasibilityReport/update`, data);
  },
  projectFeasibilityReportGet (id) {
    return request.get(`/kjxm/projectFeasibilityReport/detail/${id}`);
  },
  projectPersonResultsAddList (data) {
    return request.post(`/kjxm/projectPersonResults/addList`, data);
  },
  projectPersonResultsGet (id) {
    return request.get(`/kjxm/projectPersonResults/getByProjectId/${id}`);
  },
  getDigestById (id) {
    return request.get(`/kjxm/project/getDigestById/${id}`);
  },
  getById (id) {
    return request.get(`/kjxm/planCategory/getById/${id}`);
  },
  getTeamByBusinessId (businessId) {
    return request.get(`/kjxm/projectReviewTeam/getTeamByBusinessId/${businessId}`);
  },
  createZjBankPdfByWindows (teamId) {
    return request.post(`/kjxm/expertsReviewTeam/createZjBankPdfByWindows/${teamId}`);
  },
  reviewTeamUpdate (data) {
    return request.post('/kjxm/reviewTeam/update', data);
  },
  updateInfo (data) {
    return request.post('/kjxm/projectReviewTeam/updateInfo', data);
  },
  getZJZZPZ () {
    return request.get(`/kjxm/projectReviewTeam/getZJZZPZ`);
  },
  reviewTeamConfigList () {
    return request.get(`/kjxm/reviewTeamConfig/list`);
  },
}

export default project;
